!!!
%html
  %head
    %meta{"http-equiv"=>"content-type", :content=>"text/html; charset='utf-8'"}/
    %meta{:name=>"keywords", :content=> @settings.keywords.to_s}/
    %title
      =h @settings.title
      =h controller.action_name
    %link{:rel=>"alternate", :type=>"application/rss+xml", :href=>"media/rss"}/
    = theme_stylesheet_link_tag "ruby"
    = javascript_include_tag :defaults
  %body
    #wideframe
      #header
        %p#maintitle
          = link_to(@settings.title.to_s, :controller=>"media",:action=>"index")
        %p#subtitle
          =h @settings.subtitle.to_s
      #main
        - if (flash[:notice]!=nil)
          %p{:style=>"color:red;"}= flash[:notice]
        = yield
      #bar
        - if session[:user]==nil
          = link_to _("Log in"),:controller =>"account",:action=>"login"
        - else
          #admin
            = render_component(:controller => 'admin/menu',:action =>'show')
        #extensions
          - @exts=Extplugin.find(:all,:conditions=>{:activated=>1},:order=>"`extplugins`.`order` ASC")
          - for item in @exts
            = render_component(:controller => 'plugin/'+item.name.to_s,:action =>'show')
      #footer
        %a{:onclick=>"new Effect.ScrollTo('topbar'); return false"}
          = theme_image_tag("arrow_up.png",:border =>0)
        = link_to image_tag("mandarina.png",:align=>"bottom",:border=>0,:title=>"mandarina blog code"),"http://code.google.com/p/mandarinablog/"
        %a{:href=>"/media/rss"}
          = theme_image_tag("feed.png",:align=>"bottom",:border=>0)
        %a{:href=>"http://www.famfamfam.com/lab/icons/silk/"}
          = theme_image_tag("images.png",:border =>0,:align=>"bottom",:alt=>"famfamfam silk icons") 
        %a{:href=>"http://validator.w3.org/check?uri=referer"}
          = image_tag("valid-xhtml10.png",:alt=>"Valid XHTML 1.0 Transitional",:height=>"16",:align=>"bottom")

  
